<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

<link rel="stylesheet" type="text/css" media="screen" href="/iceberg/js/jquery-ui-themes-1.10.3/themes/cupertino/jquery-ui.css" />

<link rel="stylesheet" type="text/css"
  href="/iceberg/js/jquery.jqGrid-4.5.4/css/ui.jqgrid.css">
  
<script type="text/javascript" src="/iceberg/js/jquery.jqGrid-4.5.4/js/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="/iceberg/js/jquery.jqGrid-4.5.4/js/jquery.jqGrid.min.js"></script>
<script type="text/javascript" src="/iceberg/js/jquery.jqGrid-4.5.4/js/i18n/grid.locale-en.js"></script>

<script type="text/javascript">
 jQuery(document).ready(function(){
  var lastsel2;
  var editSettings = {
        //recreateForm: true,
        jqModal: false,
        reloadAfterSubmit: false,
        closeOnEscape: true,
        savekey: [true, 13],
        closeAfterEdit: true
      
    },
    addSettings = {
        //recreateForm: true,
        jqModal: false,
        url:'/iceberg/databaseActionCreate?tableName=' + window.parent.passingObj['tableName'],
        reloadAfterSubmit: false,
        savekey: [true, 13],
        closeOnEscape: true,
        closeAfterAdd: true
      
    }
    ,
    delSettings = {
        //recreateForm: true,
        jqModal: false,
        reloadAfterSubmit: false,
        savekey: [true, 13],
        closeOnEscape: true,
        closeAfterAdd: true
      
    };
  jQuery("#list2").jqGrid(
      {
        url : '/iceberg/databaseActionLoad?tableName=' + window.parent.passingObj["tableName"],
        datatype : "json",
        colNames : ${colNames},
        colModel : ${colModel},
        
        editurl: '/iceberg/databaseActionUpdate?tableName=' + window.parent.passingObj["tableName"],
        rowNum : 10,
        rowList : [ 10, 20, 30 ],
        pager : '#pager2',
        multiselect: true,
        viewrecords : true,
        sortorder : "desc",
        caption : "JSON Example"
      });
    jQuery("#list2").jqGrid('navGrid', '#pager2',{edit:false,add:false,del:false},editSettings, addSettings, delSettings);
    jQuery("#list2").jqGrid('inlineNav', '#pager2');
    
   });
</script>
</head>

<body>

  <form class="main">
    <table id="list2"></table>
    <div id="pager2"></div>
  </form>
</body>
</html>